import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const login = r => require.ensure([], () => r(require('@/page/login')), 'login')

const register = r => require.ensure([], () => r(require('@/page/register')), 'register')

const routes = [
  {
    path: '/',
    component: login
  },
  {
    path: '/register',
    component: register
  }
]

export default new Router({
  routes
})
